/* 
 * Copyright (c) 2016 Qualcomm Technologies, Inc. 
 * All Rights Reserved. 
 * Qualcomm Technologies, Inc. Confidential and Proprietary. 
 */
package com.thunder.rebot.rebotclient.vam.entity;

/**
 * Class for Mapper information
 */
public class MapperParams {
    public final ViewSize screen;
    public final ViewSize unused;
    public final float scale;

    /**
     * Constructor for the class
     * 
     * @param screen
     *            Screen width and height
     * @param extra
     *            screen extra empty space (vertically and horizontally)
     * @param scale
     *            scale x, y values
     */
    public MapperParams(ViewSize screen, ViewSize extra, float scale) {
        this.screen = screen;
        this.unused = extra;
        this.scale = scale;
    }

    /**
     * gets the visible width
     * 
     * @return visible width
     */
    public int getVisibleWidth() {
        return screen.width - unused.width;
    }

    /**
     * gets the visible height
     * 
     * @return visible height
     */
    public int getVisibleHeight() {
        return screen.height - unused.height;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return "screen size " + screen.width + "X" + screen.height + ", extra " + unused.width
                + "X" + unused.height + ", scale (" + scale + ")";
    }
}
